Release 10.1A: OpenEdge Development:
.NET Open Clients
ProDataTable class
The Open Client toolkit provides the
Progress.Open4GL.ProDataTableclass to provide Progress extensions to the standard functionality available in the .NET DataTable class. It inherits from the ADO .NETSystem.Data.DataTableclass. TheProgress.Open4GL.ProDataTableclass provides static methods that allow you to define Progress-specific mappings for the DataTable. This class also allows you to access theErrorStringruntime property.Before-image methods
The syntax variations for the methods available on this class are given below.
The following method returns the current value of the
BImageFlag(BEFORE-TABLEattribute) for the specified DataTable:
The following method sets the current value of the
BImageFlagfor a specified DataTable. TheBImageFlagmust be set for dynamic temp-table and ProDataSetINPUTparameters to match the value of theBEFORE-TABLEattribute for the temp-table or temp-tables within the ProDataSet in the 4GL, as shown:
Where
flagistrueorfalse.Column-related methods
For methods in this section that set the data type of a DataTable column,
proTypemust correspond to one of the valid Progress temp-table field data types found in theProgress.Open4GL.Parameterclass, as shown in Table 4–7.
Table 4–7: Progress temp-table field data types Progress temp-table field data type Progress.Open4GL.Parameterclass constant
The following method returns the integer value representing the Progress data type (see Table 4–7) for the specified column in the specified DataTable:
Where
colNameis the name of the column in the DataTable.The following methods set the Progress data type for the specified data column, where
proTypemust correspond to one of the valid Progress-specific class constants found in theProgress.Open4GL.Parameterclass (see Table 4–7):
Where
colNameis the name of the column in the DataTable.
Where
dcis the DataColumn.The following methods return the integer value representing the Progress data type (see Table 4–7) for the specified DataColumn:
Where
colNameis the name of the column in the DataTable.
Where
dcis the DataColumn.The following method returns
trueif the specified column in the specified DataTable is part of a temp-table array field:
Where
colNameis the name of the column in the DataTable.The following method identifies a set of columns that are the flattened representation of a temp-table array field for the specified DataTable:
Where:
For example, a DataTable with the columns Name, Phone, Month1, Month2, Month3, Month4, Month5, Month6, Month7, Month8, Month9, Month10, Month11, and Month12 that mapped to a temp-table with three columns, Name, Phone, and Month with extent 12, would need to have a call to this method as follows:
The following method returns the 0-based display position of the specified DataColumn within its DataTable:
The following method sets the 0-based display position of the specified DataColumn:
Error handling methods
The following method returns any error string associated with the specified DataTable returned from Progress. You can use the following method on an
INPUT-OUTPUTorOUTPUTparameter to determine any error returned by the remote 4GL method:
The following method sets the error string associated with the specified DataTable. You can use the following method to relay an error to the remote 4GL method on an
INPUTorINPUT-OUTPUTparameter:
Where
newValueis the error string value.Array methods
The following methods return the array field name with which the specified DataColumn is associated. If it is not part of an array, it returns null:
The array field name for a DataColumn is set when
ProDataTable.SetExtentColumns()is called.Schema marshaling methods
The following method allows the specified DataTable to be marshaled from the .NET client to the AppServer without schema information, when
flagis set totrue:
Using this method suppresses index descriptions and all field information and aids in faster transmission of data, thereby increasing the performance of your application.
You can use this method when the receiving side knows the schema definition for the table and validation is not necessary.
The corresponding Progress temp-table on the AppServer must have the same schema as the DataTable on the client. You can use the
SetNoSchemaMarshalmethod with a strongly typed DataTable parameter or a DataTable within a strongly typed DataSet parameter. If set totrue, when the DataTable is sent to the AppServer, Progress generates aProgress.Open4GL.Exceptions.RunTime4GLErrorExceptionif the Progress temp-table’s schema does not match the incoming data from the .NET client.The following method returns
trueif the DataTable parameter is not marshaled with schema information to the AppServer; it returnsfalseif schema information is marshaled:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |